package nz.ac.massey.groupproject.ecs2;

// TODO should we replace Position etc with vec2?
public final class Vec2l {
	public final long x, y;

	public Vec2l(long xx, long yy) { x = xx;        y = yy;        }
	public Vec2l(int  xx, int  yy) { x = (long) xx; y = (long) yy; }

	// TODO equals, hashCode

	public final Vec2l neg()         {  return new Vec2l(-x, -y);                 }
	public final Vec2l add (Vec2l v) {  return new Vec2l(  x + v.x,  y + v.y  );  }
	public final Vec2l sub (Vec2l v) {  return new Vec2l(  x - v.x,  y - v.y  );  }
	//public final Vec2l mul (long c)  {  return new Vec2l(   c * x,    c * y   );  }
	public final long cprod(Vec2l v) {  return  x * v.y  -  y * v.x;  }
	//public final long dot  (Vec2l v) {  return  x * v.x  +  y * v.y;  }
}
